<template>
  <div>
    <el-table :data="array" style="width: 100%">
      <el-table-column prop="img" label="头像">
        <template slot-scope="scope">
          <img :src="'http://localhost:3000'+scope.row.img" width="40" height="40" />
        </template>
      </el-table-column>
      <el-table-column prop="name" label="管理员名称"></el-table-column>
      <el-table-column prop="password" label="密码"></el-table-column>
      <el-table-column>
        <template slot="header">
          <!-- <el-button size="mini" type="danger" @click="addadmin">新增</el-button> -->
          <el-button size="mini" type="danger">新增</el-button>
        </template>
        <template>
          <el-switch v-model="value1" active-text="冻结" inactive-text="解冻"></el-switch>
          <!-- <el-button size="mini" type="danger" @click="deleteAdmin(scope.$index, scope.row)">删除</el-button> -->
        </template>
      </el-table-column>
    </el-table>
    <el-button type="success" @click="$router.push('/system/picture')" round>轮播图管理</el-button>
  </div>
</template>

<script>
import axios from "axios";
import { request } from "../../network/request";
import { createNamespacedHelpers } from "vuex";
const { mapState, mapActions } = createNamespacedHelpers("admin");
export default {
  data() {
    return {
      
      pagedata: {
        currentPage: 1,
        pageSize: 3,
        total: ""
      },
      value1: true
    };
  },
  computed: {
    ...mapState(["array"])
  },
  methods: {
    ...mapActions(["getSuperAdmin"]),
    imgs() {}
  },
  created() {
    this.getSuperAdmin({
      currentPage: this.pagedata.currentPage,
      pageSize: this.pagedata.pageSize
    });
    console.log(this.array)
  }
};
</script>

<style>
</style>